// 修改后的 StudentServiceImpl.java
package t25525;

import java.sql.SQLException;

public class StudentServiceImpl extends StudentService {
    // 创建数据访问层的对象
    private StudentDao studentDao = new StudentDaoImpl();

    public StudentServiceImpl() throws SQLException, ClassNotFoundException {
    }

    @Override
    public int add(Student student) throws SQLException, ClassNotFoundException {
        // 调用数据访问层的添加方法
        return studentDao.add(student);
    }
}

